package com.qmx.qmxapp.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.qmx.qmxapp.R;
import com.qmx.qmxapp.activity.PersonInfoActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * A simple {@link Fragment} subclass.
 */
public class MineFragment extends Fragment {
    @BindView(R.id.tv_mine)
    TextView tv_mine;
    @BindView(R.id.tv_mine_yun_meeting)
    TextView tv_mine_yun_meeting;
    @BindView(R.id.tv_mine_set)
    TextView tv_mine_set;
    @BindView(R.id.tv_mine_about)
    TextView tv_mine_about;

    private View mMineFragment;

    public MineFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        mMineFragment = inflater.inflate(R.layout.fragment_mine, container, false);
        ButterKnife.bind(this,mMineFragment);
        return mMineFragment;
    }

    @OnClick({R.id.tv_mine, R.id.tv_mine_yun_meeting, R.id.tv_mine_set, R.id.tv_mine_about})
    public void onClick(View view) {
        Intent intent = new Intent();
        switch (view.getId()) {
            case R.id.tv_mine:
                intent.setClass(getActivity(), PersonInfoActivity.class);
                break;
            case R.id.tv_mine_yun_meeting:
                intent.setClass(getActivity(), PersonInfoActivity.class);
                break;
            case R.id.tv_mine_set:
                intent.setClass(getActivity(), PersonInfoActivity.class);
                break;
            case R.id.tv_mine_about:
                intent.setClass(getActivity(), PersonInfoActivity.class);
                break;
        }
        startActivity(intent);
    }

}
